home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 7.8 KB | 361 lines | [TEXT/MPS ] |
- ;
- ; File: Fonts.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__FONTS__') = 'UNDEFINED' THEN
- __FONTS__ SET 1
-
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
-
- systemFont EQU 0
- applFont EQU 1
- newYork EQU 2
- geneva EQU 3
- monaco EQU 4
- venice EQU 5
- london EQU 6
- athens EQU 7
- sanFran EQU 8
- toronto EQU 9
- cairo EQU 11
- losAngeles EQU 12
- times EQU 20
- helvetica EQU 21
- courier EQU 22
- symbol EQU 23
- mobile EQU 24
- commandMark EQU 17
- checkMark EQU 18
- diamondMark EQU 19
-
- appleMark EQU 20
- propFont EQU 36864
- prpFntH EQU 36865
- prpFntW EQU 36866
- prpFntHW EQU 36867
- fixedFont EQU 45056
- fxdFntH EQU 45057
- fxdFntW EQU 45058
- fxdFntHW EQU 45059
- fontWid EQU 44208
-
- FMInput RECORD 0
- family ds.w 1
- size ds.w 1
- face ds.b 1
- needBits ds.b 1
- device ds.w 1
- numer ds Point
- denom ds Point
- sizeof EQU 16
- ENDR
-
- FMOutput RECORD 0
- errNum ds.w 1
- fontHandle ds.l 1
- boldPixels ds.b 1
- italicPixels ds.b 1
- ulOffset ds.b 1
- ulShadow ds.b 1
- ulThick ds.b 1
- shadowPixels ds.b 1
- extra ds.b 1
- ascent ds.b 1
- descent ds.b 1
- widMax ds.b 1
- leading ds.b 1
- curStyle ds.b 1
- numer ds Point
- denom ds Point
- sizeof EQU 26
- ENDR
-
- FontRec RECORD 0
- fontType ds.w 1 ;font type
- firstChar ds.w 1 ;ASCII code of first character
- lastChar ds.w 1 ;ASCII code of last character
- widMax ds.w 1 ;maximum character width
- kernMax ds.w 1 ;negative of maximum character kern
- nDescent ds.w 1 ;negative of descent
- fRectWidth ds.w 1 ;width of font rectangle
- fRectHeight ds.w 1 ;height of font rectangle
- owTLoc ds.w 1 ;offset to offset/width table
- ascent ds.w 1 ;ascent
- descent ds.w 1 ;descent
- leading ds.w 1 ;leading
- rowWords ds.w 1 ;row width of bit image / 2
- sizeof EQU 26
- ENDR
-
- FMetricRec RECORD 0
- ascent ds.l 1 ;base line to top
- descent ds.l 1 ;base line to bottom
- leading ds.l 1 ;leading between lines
- widMax ds.l 1 ;maximum character width
- wTabHandle ds.l 1 ;handle to font width table
- sizeof EQU 20
- ENDR
-
- WidEntry RECORD 0
- widStyle ds.w 1 ;style entry applies to
- sizeof EQU 2
- ENDR
-
- WidTable RECORD 0
- numWidths ds.w 1 ;number of entries - 1
- sizeof EQU 2
- ENDR
-
- AsscEntry RECORD 0
- fontSize ds.w 1
- fontStyle ds.w 1
- fontID ds.w 1 ;font resource ID
- sizeof EQU 6
- ENDR
-
- FontAssoc RECORD 0
- numAssoc ds.w 1 ;number of entries - 1
- sizeof EQU 2
- ENDR
-
- StyleTable RECORD 0
- fontClass ds.w 1
- offset ds.l 1
- reserved ds.l 1
- indexes ds.b 48
- sizeof EQU 58
- ENDR
-
- NameTable RECORD 0
- stringCount ds.w 1
- baseFontName ds.l 64
- sizeof EQU 258
- ENDR
-
- KernPair RECORD 0
- kernFirst ds.b 1 ;1st character of kerned pair
- kernSecond ds.b 1 ;2nd character of kerned pair
- kernWidth ds.w 1 ;kerning in 1pt fixed format
- sizeof EQU 4
- ENDR
-
- KernEntry RECORD 0
- kernLength ds.w 1 ;length of this entry
- kernStyle ds.w 1 ;style the entry applies to
- sizeof EQU 4
- ENDR
-
- KernTable RECORD 0
- numKerns ds.w 1 ;number of kerning entries
- sizeof EQU 2
- ENDR
-
- WidthTable RECORD 0
- tabData ds.l 256 ;character widths
- tabFont ds.l 1 ;font record used to build table
- sExtra ds.l 1 ;space extra used for table
- style ds.l 1 ;extra due to style
- fID ds.w 1 ;font family ID
- fSize ds.w 1 ;font size request
- face ds.w 1 ;style (face) request
- device ds.w 1 ;device requested
- inNumer ds Point ;scale factors requested
- inDenom ds Point ;scale factors requested
- aFID ds.w 1 ;actual font family ID for table
- fHand ds.l 1 ;family record used to build up table
- usedFam ds.b 1 ;used fixed point family widths
- aFace ds.b 1 ;actual face produced
- vOutput ds.w 1 ;vertical scale output value
- hOutput ds.w 1 ;horizontal scale output value
- vFactor ds.w 1 ;vertical scale output value
- hFactor ds.w 1 ;horizontal scale output value
- aSize ds.w 1 ;actual size of actual font used
- tabSize ds.w 1 ;total size of table
- sizeof EQU 1072
- ENDR
-
- FamRec RECORD 0
- ffFlags ds.w 1 ;flags for family
- ffFamID ds.w 1 ;family ID number
- ffFirstChar ds.w 1 ;ASCII code of 1st character
- ffLastChar ds.w 1 ;ASCII code of last character
- ffAscent ds.w 1 ;maximum ascent for 1pt font
- ffDescent ds.w 1 ;maximum descent for 1pt font
- ffLeading ds.w 1 ;maximum leading for 1pt font
- ffWidMax ds.w 1 ;maximum widMax for 1pt font
- ffWTabOff ds.l 1 ;offset to width table
- ffKernOff ds.l 1 ;offset to kerning table
- ffStylOff ds.l 1 ;offset to style mapping table
- ffProperty ds.w 9 ;style property info
- ffIntl ds.w 2 ;for international use
- ffVersion ds.w 1 ;version number
- sizeof EQU 52
- ENDR
-
- IF GENERATING68K THEN
- _InitFonts: OPWORD $A8FE
- ELSE
- IMPORT InitFonts
- ENDIF
-
- IF GENERATING68K THEN
- _GetFontName: OPWORD $A8FF
- ELSE
- IMPORT GetFontName
- ENDIF
-
- IF GENERATING68K THEN
- _GetFNum: OPWORD $A900
- ELSE
- IMPORT GetFNum
- ENDIF
-
- IF GENERATING68K THEN
- _RealFont: OPWORD $A902
- ELSE
- IMPORT RealFont
- ENDIF
-
- IF GENERATING68K THEN
- _SetFontLock: OPWORD $A903
- ELSE
- IMPORT SetFontLock
- ENDIF
-
- IF GENERATING68K THEN
- _FMSwapFont: OPWORD $A901
- ELSE
- IMPORT FMSwapFont
- ENDIF
-
- IF GENERATING68K THEN
- _SetFScaleDisable: OPWORD $A834
- ELSE
- IMPORT SetFScaleDisable
- ENDIF
-
- IF GENERATING68K THEN
- _FontMetrics: OPWORD $A835
- ELSE
- IMPORT FontMetrics
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetDefFontSize
- dc.w $3EB8
- dc.w $0BA8
- dc.w $6604
- dc.w $3EBC
- dc.w $000C
- EndM
- ELSE
- IMPORT GetDefFontSize
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _IsOutline
- moveq #0,d0
- dc.w $A854
- EndM
- ELSE
- IMPORT IsOutline
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SetOutlinePreferred
- moveq #1,d0
- dc.w $A854
- EndM
- ELSE
- IMPORT SetOutlinePreferred
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetOutlinePreferred
- moveq #9,d0
- dc.w $A854
- EndM
- ELSE
- IMPORT GetOutlinePreferred
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _OutlineMetrics
- moveq #8,d0
- dc.w $A854
- EndM
- ELSE
- IMPORT OutlineMetrics
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SetPreserveGlyph
- moveq #10,d0
- dc.w $A854
- EndM
- ELSE
- IMPORT SetPreserveGlyph
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetPreserveGlyph
- moveq #11,d0
- dc.w $A854
- EndM
- ELSE
- IMPORT GetPreserveGlyph
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _FlushFonts
- moveq #12,d0
- dc.w $A854
- EndM
- ELSE
- IMPORT FlushFonts
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- GetSysFont
- move.W $0BA6,(sp)
- EndM
- ELSE
- IMPORT GetSysFont
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- GetAppFont
- move.W $0984,(sp)
- EndM
- ELSE
- IMPORT GetAppFont
- ENDIF
-
- ENDIF ; __FONTS__
-